import Vue from 'vue'
import Router from 'vue-router'
import Login from '../components/Login.vue'
import Index from '../components/Index'
import MenuList from '../components/user/MenuList'
import UserList from '../components/user/UserList'
import RoleList from '../components/user/RoleList'
import AreaList from '../components/user/AreaList'
import HandleList from '../components/user/HandleList'
import Family from '../components/user4/FamilyList'
import Canhe from '../components/user4/Canhe'
import ChronicList from '../components/user4/ChronicList'
import Baoxiao from '../components/user4/Baoxiao'
import Zheng from '../components/user2/Zheng'
import BaoxiaoList from '../components/user4/BaoxiaoList'
import Chroniclist from '../components/user2/Chroniclist'
import Chronicfind from '../components/user2/Chronicfind'
import axios from 'axios'
Vue.prototype.$axios = axios

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: '登录界面',
      component: Login
    },
    // ##################################管理员界面
    {
      path: '/index',
      name: '系统设置',
      component: Index,
      children: [
        {
          path: '/index/menulist',
          name: '菜单管理',
          component: MenuList
        },
        {
          path: '/index/rolelist',
          name: '角色管理',
          component: RoleList
        },
        {
          path: '/index/userlist',
          name: '用户管理',
          component: UserList
        }
      ]
    },
    {
      path: '/index',
      name: '信息管理',
      component: Index,
      children: [
        {
          path: '/index/areaList',
          name: '行政区域管理',
          component: AreaList
        },
        {
          path: '/index/handleList',
          name: '农合经办点管理',
          component: HandleList
        },
        {
          path: '/index/chroniclist',
          name: '医疗机构管理',
          component: Chroniclist
        },
        {
          path: '/index/chronicfind',
          name: '慢性病分类管理',
          component: Chronicfind
        }
      ]
    },
    // ##################################领导界面
    {
      path: '/index',
      name: '信息管理',
      component: Index,
      children: [
        {
          path: '/index/familylist',
          name: '家庭档案管理',
          component: Family
        },
        {
          path: '/index/handleList',
          name: '农合经办点管理',
          component: HandleList
        }
      ]
    },
    {
      path: '/index',
      name: '业务功能',
      component: Index,
      children: [
        {
          path: '/index/Zheng',
          name: '慢性病政策设置',
          component: Zheng
        }
      ]
    },
    // ##################################乡办界面
    {
      path: '/index',
      name: '信息管理',
      component: Index,
      children: [
        {
          path: '/index/familylist',
          name: '家庭档案管理',
          component: Family
        },
        {
          path: '/index/baoxiao',
          name: '慢性病报销记录查询',
          component: BaoxiaoList
        }
      ]
    },
    {
      path: '/index',
      name: '业务功能',
      component: Index,
      children: [
        {
          path: '/index/canhelist',
          name: '参合登记',
          component: Canhe
        },
        {
          path: '/index/chronicList1',
          name: '慢性病证管理',
          component: ChronicList
        },
        {
          path: '/index/baoxiaolist',
          name: '慢病报销',
          component: Baoxiao
        }
      ]
    }
  ]
})
